|
Void safety is a guarantee within an object-oriented programming language that no object references will have ''null'' or ''void'' values. In object-oriented languages, access to objects is achieved through references (or, equivalently, pointers). A typical call is of the form: x.f(a, ...) where ''f'' denotes an operation and ''x'' denotes a reference to some object. At execution time, however, a reference can be ''void'' (or ''null''). In such cases, the call above will be a void call, leading to a run-time exception, often resulting in abnormal termination of the program. Void safety is a static (compile-time) guarantee that no void calls will ever arise. ==History== In a 2009 talk, Tony Hoare traced the invention of the null pointer to his design of the Algol W language and called it a "mistake": Bertrand Meyer introduced the term "void safety".〔Bertrand Meyer: ''Attached Types and their Application to Three Open Problems of Object-Oriented Programming'', in ''ECOOP 2005 (Proceedings of European Conference on Object-Oriented Programming, Edinburgh, 25–29 July 2005)'', ed. Andrew Black, Lecture Notes in Computer Science 3586, Springer Verlag, 2005, pages 1-32, also available (online )〕 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Void safety」の詳細全文を読む スポンサード リンク
|